package com.pmenergy.model;
// Generated 19/09/2014 07:43:20 PM by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ManoObraActividad generated by hbm2java
 */
@Entity
@Table(name = "MANO_OBRA_ACTIVIDAD", schema = "TECNOTREE")
public class ManoObraActividad implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ManoObraActividadId id;
	private Actividad actividad;
	private ManoObra manoObra;
	private BigDecimal cantidad;
	private BigDecimal jornalHora;
	private BigDecimal costoHora;
	private BigDecimal rendimiento;
	private BigDecimal costo;

	public ManoObraActividad() {
	}

	public ManoObraActividad(ManoObraActividadId id, Actividad actividad,
			ManoObra manoObra) {
		this.id = id;
		this.actividad = actividad;
		this.manoObra = manoObra;
	}

	public ManoObraActividad(ManoObraActividadId id, Actividad actividad,
			ManoObra manoObra, BigDecimal cantidad, BigDecimal jornalHora,
			BigDecimal costoHora, BigDecimal rendimiento, BigDecimal costo) {
		this.id = id;
		this.actividad = actividad;
		this.manoObra = manoObra;
		this.cantidad = cantidad;
		this.jornalHora = jornalHora;
		this.costoHora = costoHora;
		this.rendimiento = rendimiento;
		this.costo = costo;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "manoObraId", column = @Column(name = "MANO_OBRA_ID", nullable = false, precision = 22, scale = 0)),
			@AttributeOverride(name = "actividadId", column = @Column(name = "ACTIVIDAD_ID", nullable = false, precision = 22, scale = 0)) })
	public ManoObraActividadId getId() {
		return this.id;
	}

	public void setId(ManoObraActividadId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ACTIVIDAD_ID", nullable = false, insertable = false, updatable = false)
	public Actividad getActividad() {
		return this.actividad;
	}

	public void setActividad(Actividad actividad) {
		this.actividad = actividad;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "MANO_OBRA_ID", nullable = false, insertable = false, updatable = false)
	public ManoObra getManoObra() {
		return this.manoObra;
	}

	public void setManoObra(ManoObra manoObra) {
		this.manoObra = manoObra;
	}

	@Column(name = "CANTIDAD", precision = 22, scale = 0)
	public BigDecimal getCantidad() {
		return this.cantidad;
	}

	public void setCantidad(BigDecimal cantidad) {
		this.cantidad = cantidad;
	}

	@Column(name = "JORNAL_HORA", precision = 22, scale = 0)
	public BigDecimal getJornalHora() {
		return this.jornalHora;
	}

	public void setJornalHora(BigDecimal jornalHora) {
		this.jornalHora = jornalHora;
	}

	@Column(name = "COSTO_HORA", precision = 22, scale = 0)
	public BigDecimal getCostoHora() {
		return this.costoHora;
	}

	public void setCostoHora(BigDecimal costoHora) {
		this.costoHora = costoHora;
	}

	@Column(name = "RENDIMIENTO", precision = 22, scale = 0)
	public BigDecimal getRendimiento() {
		return this.rendimiento;
	}

	public void setRendimiento(BigDecimal rendimiento) {
		this.rendimiento = rendimiento;
	}

	@Column(name = "COSTO", precision = 22, scale = 0)
	public BigDecimal getCosto() {
		return this.costo;
	}

	public void setCosto(BigDecimal costo) {
		this.costo = costo;
	}

}
